<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="STYLESHEET" href="print_static.css" type="text/css" />
<style type="text/css">
body{
	padding: 0.4in 1in 0.3in 1.5in;
	font-size:8px;
}
table { border-collapse: collapse; width: 100%; }
td  {padding:2px}
h1 {font-size:145%; text-align:center; font-weight:normal;}

.logo { width: auto; float:left; font-size:7; font-weight:bold; text-align:left}
.logo table {width: 100%;}
.logo td {border: 0; }
.tabla thead {border:0; height: 30px;}
.tabla td {border: 0.5pt solid black;}
.materia {text-align: justify;}
.foot { width: 100%;}
.espacio {height:50px;}

div.salto{
	height:1px; width:100%;
	page-break-after: always
}
</style>
</head>

<body>
<script type="text/php">
$header=$pdf->open_object();
$pdf->image("system/application/views/images/logo.png", "png", 110, 30, 60, 50);
$pdf->close_object();
$pdf->add_object($header, "add");
</script>
<table>
		<tr>
			<!--td><img src="<?php echo base_url();?>system/application/views/images/logo.gif"/></td-->
			<td><h1>TRIBUNAL ELECTORAL REGIONAL DEL MAULE LIBRO DE INGRESO</h1></td>
		</tr>
</table>



<p align="right">
<?php
	$date = date('Y-m-d');
	echo "Talca, ".$this->my_library->dayMonthYear($date).".-"; 
?></p>
<div class="tabla">
<table>
	<thead>
	<tr>
		<th width="40">Rol</th>
		<th width="50">Procedencia</th>
		<th width="55">fecha Iniciación</th>
		<th width="120">Materia</th>
		<th width="100">Reclamante</th>
		<th width="100">Reclamado</th>
		<th width="auto">Fs. Sentencia</th>
		<th width="auto">Apelación</th>
		<th width="auto">N° Fojas</th>
		<th width="auto">Fecha Remisión</th>
		<th width="auto">Cumplasé</th>
		<th width="auto">Archivada</th>
		
	</tr>
	</thead>
<?php
			foreach($resultados->result() as $row)
	     	{
	     		echo "<tr>";
	     		echo "<td align='center'>".$row->rol."</td>";
	     		echo "<td align='center'>".$row->procedencia."</td>";
	     		echo "<td align='center'>".$row->fecha_iniciacion."</td>";
	     		echo "<td>".wordwrap($row->materia,  25, "<br />\n")."</td>";
	     		echo "<td>".wordwrap($row->reclamante,  25, "<br />\n")."</td>";
	     		echo "<td>".wordwrap($row->reclamado,  25, "<br />\n")."</td>";
	     		echo "<td align='center'>".$row->fs_sentencia."</td>";
	     		if(strcmp('0000-00-00',$row->apelacion) == 0)
	     		{
	     			echo "<td align='center'></td>";
	     		}
	     		else
	     		{
	     			echo "<td align='center'>".$row->apelacion."</td>";
	     		}
	     		if(strcmp('0',$row->num_fojas) == 0)
	     		{
	     			echo "<td align='center'></td>";
	     		}
	     		else
	     		{
	     			echo "<td align='center'>".$row->num_fojas."</td>";
	     		}
	     		if(strcmp('0000-00-00',$row->fecha_remision) == 0)
	     		{
	     			echo "<td align='center'></td>";
	     		}
	     		else
	     		{
	     			echo "<td align='center'>".$row->fecha_remision."</td>";
	     		}
	     		if(strcmp('0000-00-00',$row->cumplase) == 0)
	     		{
	     			echo "<td align='center'></td>";
	     		}
	     		else
	     		{
	     			echo "<td align='center'>".$row->cumplase."</td>";
	     		}
	     		if(strcmp('0000-00-00',$row->archivada) == 0)
	     		{
	     			echo "<td align='center'></td>";
	     		}
	     		else
	     		{
	     			echo "<td align='center'>".$row->archivada."</td>";
	     		}
	     	}
	     	echo "</tr>";
     		
     ?>
	</tbody>
</table>
</div>
<div class="espacio"></div>
<div class="salto"></div>
</body>
</html>